package com.web.exiaodao.business.entity;

import com.web.webstart.base.entity.BaseEntity;
import com.web.webstart.base.util.XaUtil;
import com.wordnik.swagger.annotations.ApiModel;
import com.wordnik.swagger.annotations.ApiModelProperty;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author eason
 * @ClassName: news
 * @Description: 咨询定义表
 * @date 2015年3月23日 下午1:00:00
 */
@Entity
@Table(name = "tb_xa_news")
@ApiModel(value = "咨询定义表")
public class News extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "标题,咨询新闻-标题")
    private String title;
    @ApiModelProperty(value = "咨询来源,咨询来源")
    private String source;
    @ApiModelProperty(value = "咨询缩略图,咨询缩略图thumbnail")
    private String thumbnail;
    @ApiModelProperty(value = "内容,图文混排的内容,content")
    private String content;
    @ApiModelProperty(value = "是否是热点,是否是热点,默认false")
    private Boolean isHot;
    /**
     * 类型是活的，see
     * {@link com.web.exiaodao.business.entity.Category}
     */
    @ApiModelProperty(value = "类别: 2：展会，3：政策，4：国际，5:电子书")
    private Long type;


    public void setTitle(String title) {
        this.title = title;
    }

    @Column(nullable = true, length = 100)
    public String getTitle() {
        return title;
    }

    public void setSource(String source) {
        this.source = source;
    }

    @Column(nullable = true, length = 50)
    public String getSource() {
        return source;
    }

    public void setThumbnail(String thumbnail) {
        this.thumbnail = thumbnail;
    }

    @Column(nullable = true, length = 255)
    public String getThumbnail() {
        return thumbnail;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Column(nullable = true, length = 5000, columnDefinition = "MEDIUMTEXT")
    public String getContent() {
        return content;
    }

    public void setIsHot(Boolean isHot) {
        this.isHot = isHot;
    }

    @Column(nullable = true, length = 5)
    public Boolean getIsHot() {
        return XaUtil.getBool(isHot);
    }

    public void setType(Long type) {
        this.type = type;
    }

    @Column(nullable = true, length = 1)
    public Long getType() {
        return type;
    }


}
